import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { resolve } from "path";
import WindiCSS from "vite-plugin-windicss";

// https://vitejs.dev/config
export default defineConfig({
  plugins: [
    vue(),
    WindiCSS(), // 正确使用插件
  ],
  resolve: {
    alias: {
      "@": resolve(__dirname, "src"), // 设置根目录别名
    },
  },
  css: {
    preprocessorOptions: {
      scss: {
        additionalData: `
           @use "@/styles/global.scss";
        `,
      },
    },
  },
});
